home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / net / netamsrc.arc / dir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-02-09  |  936 b   |  32 lines

  1. /* dir.h - portable directory routine definitions
  2.  * :ts=8 ma=1 bk=0
  3.  *
  4.  * the "dir" struct is maintained by the opendir/readdir/closedir suite.
  5.  * user code may read the contents, but should not modify them.
  6.  *
  7.  * FREELY DISTRIBUTABLE
  8.  * j w hamilton, 7 nov 86
  9.  */
  10.  
  11. #ifndef    LIBRARIES_DOS_H
  12. #include <libraries/dos.h>        /* for FileInfoBlock */
  13. #endif    /*LIBRARIES_DOS_H*/
  14.  
  15. #ifndef    LIBRARIES_DOSEXTENS_H
  16. #include <libraries/dosextens.h>    /* for FileLock */
  17. #endif    /*LIBRARIES_DOSEXTENS_H*/
  18.  
  19. typedef struct dir {            /* directory descriptor */
  20.     struct FileLock *dd_lock;    /* read lock on opened dir */
  21.     struct FileInfoBlock *dd_fib;    /* buffer for Examine/ExNext */
  22. } DIR;
  23.  
  24. #define d_name dd_fib->fib_FileName
  25. #define d_namlen dd_fib->fib_Size
  26. DIR *opendir(/* char *dirname */);
  27. struct FileInfoBlock *readdir(/* DIR *dp */);
  28. long telldir(/* DIR *dp */);
  29. void seekdir(/* long pos */);
  30. void rewinddir(/* DIR *dp */);
  31. void closedir(/* DIR *dp */);
  32.